package com.pulse.base.mapper;

import com.pulse.base.domain.CircuitThreshold;
import org.apache.ibatis.annotations.Param;

/**
 * @ClassName CircuitThresholdMapper
 * @Description
 * @Author 陆帅
 * @Date 2024/8/6 14:25
 */
public interface CircuitThresholdMapper {

    /**
     * 添加报警阈值
     * @param circuitThreshold
     * @return
     */
    public int insertCircuitThreshold(CircuitThreshold circuitThreshold);

    /**
     * 修改报警阈值
     * @param circuitThreshold
     * @return
     */
    public int updateCircuitThreshold(CircuitThreshold circuitThreshold);

    /**
     * 根据id删除报警阈值
     * @param thresholdId
     * @return
     */
    public int deleteCircuitThresholdByThresholdId(Long thresholdId);

    /**
     * 根据id列表删除
     * @param thresholdIds
     * @return
     */
    public int deleteCircuitThresholdByThresholdIds(Long[] thresholdIds);

    /**
     * 根据设备id删除阈值信息
     * @param deviceNo
     * @return
     */
    int deleteCircuitThresholdByDeviceNo(String deviceNo);

    /**
     * 根据设备编号和设备通道查询阈值信息
     * @param deviceNo
     * @param channel
     * @return
     */
    CircuitThreshold selectThresholdByDeviceNoAndChannel(@Param("deviceNo") String deviceNo, @Param("channel") Integer channel);
}
